SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vw_POFEstructural
AS
SELECT DISTINCT 
    p.CUPOF, p.idPlaza, o.idOrganizaciones, o.CUISE, o.Nombre, 
    p.Division
FROM tb_Plazas p INNER JOIN
    tb_Organizaciones o ON 
    p.Organizacion = o.idOrganizaciones
WHERE (p.FechaBaja IS NULL) AND (p.Baja = 'N')
GO
GRANT SELECT ON  [dbo].[vw_POFEstructural] TO [SoloVer]
GO
